import os
from locust import TaskSet, task, HttpUser


class msiTask(TaskSet):
    @task
    def live1(self):
        url = "/api/appapi/api/comment/get-emojis?api_version=4.0&tenantid=a33433adbbe5d17cacaa7fcc97556ebc&tenantId=a33433adbbe5d17cacaa7fcc97556ebc&client=android&cms_app_id=19&app_id=2&app_version=1.0.40&sign=96dd252b402aa8a58af6fad2e711e714"
        res = self.client.get(url=url)

    @task
    def live2(self):
        url = "/api/appapi/api/configuration?starting_img_client=android&api_version=4.0&tenantid=a33433adbbe5d17cacaa7fcc97556ebc&tenantId=a33433adbbe5d17cacaa7fcc97556ebc&client=android&cms_app_id=19&app_id=2&app_version=1.0.40&sign=59bd5c5efc04b3cf3d61e35564469fa9"
        res = self.client.get(url=url)
        
    @task
    def live3(self):
        url = "/api/appapi/api/navigatetag/list?api_version=4.0&tenantid=a33433adbbe5d17cacaa7fcc97556ebc&tenantId=a33433adbbe5d17cacaa7fcc97556ebc&client=android&cms_app_id=19&app_id=2&app_version=1.0.40&sign=96dd252b402aa8a58af6fad2e711e714"
        res = self.client.get(url=url)

    @task
    def live4(self):
        url = "/api/appapi/api/theme/show?date=2025-09-29&api_version=4.0&tenantid=a33433adbbe5d17cacaa7fcc97556ebc&tenantId=a33433adbbe5d17cacaa7fcc97556ebc&client=android&cms_app_id=19&app_id=2&app_version=1.0.40&sign=3a89e2b0185131a71ffe9dcc5936273a"
        res = self.client.get(url=url)

    @task
    def live5(self):
        url = "/api/appapi/api/content/get-content-config?api_version=4.0&tenantid=a33433adbbe5d17cacaa7fcc97556ebc&tenantId=a33433adbbe5d17cacaa7fcc97556ebc&client=android&cms_app_id=19&app_id=2&app_version=1.0.40&sign=96dd252b402aa8a58af6fad2e711e714"
        res = self.client.get(url=url)

    @task
    def live6(self):
        url = "/api/appapi/api/navigate/children?navigate_id=6&have_own=0&api_version=4.0&tenantid=a33433adbbe5d17cacaa7fcc97556ebc&tenantId=a33433adbbe5d17cacaa7fcc97556ebc&client=android&cms_app_id=19&app_id=2&app_version=1.0.40&sign=bcb9817937aa3adb066214dae1161f2d"
        res = self.client.get(url=url)
        
        
    @task
    def live8(self):
        url = "/api/appapi/api/config-other?api_version=4.0&tenantid=a33433adbbe5d17cacaa7fcc97556ebc&tenantId=a33433adbbe5d17cacaa7fcc97556ebc&client=android&cms_app_id=19&app_id=2&app_version=1.0.40&sign=96dd252b402aa8a58af6fad2e711e714"
        res = self.client.get(url=url)
        
    @task
    def live9(self):
        url = "/api/appapi/api/navigate/children?navigate_id=114&have_own=0&api_version=4.0&tenantid=a33433adbbe5d17cacaa7fcc97556ebc&tenantId=a33433adbbe5d17cacaa7fcc97556ebc&client=android&cms_app_id=19&app_id=2&app_version=1.0.40&sign=4b8159f3fad3b6e318aa0409b94508ec"
        res = self.client.get(url=url)
        
        
    @task
    def live11(self):
        url = "/api/appapi/api/navigate/children?navigate_id=98&have_own=0&api_version=4.0&tenantid=a33433adbbe5d17cacaa7fcc97556ebc&tenantId=a33433adbbe5d17cacaa7fcc97556ebc&client=android&cms_app_id=19&app_id=2&app_version=1.0.40&sign=aa7991344df7e5365ed3dc860dccafdf"
        res = self.client.get(url=url)
        
    @task
    def live12(self):
        url = "/api/appapi/api/navigate/children?navigate_id=58&have_own=0&api_version=4.0&tenantid=a33433adbbe5d17cacaa7fcc97556ebc&tenantId=a33433adbbe5d17cacaa7fcc97556ebc&client=android&cms_app_id=19&app_id=2&app_version=1.0.40&sign=d11972ed13e36335cc80e581c683e09e"
        res = self.client.get(url=url)
       
    @task
    def live13(self):
        url = "/api/appapi/api/set-up/update-version?api_version=4.0&tenantid=a33433adbbe5d17cacaa7fcc97556ebc&tenantId=a33433adbbe5d17cacaa7fcc97556ebc&client=android&cms_app_id=19&app_id=2&app_version=1.0.40&sign=96dd252b402aa8a58af6fad2e711e714"
        res = self.client.get(url=url)
        
    @task
    def live14(self):
        url = "/api/appapi/api/content/list/6?perPage=20&client=android&no_content=1&page=1&api_version=4.0&tenantid=a33433adbbe5d17cacaa7fcc97556ebc&tenantId=a33433adbbe5d17cacaa7fcc97556ebc&cms_app_id=19&app_id=2&app_version=1.0.40&sign=2a42e7e15d3d6f43fe699aef71276ffc"
        res = self.client.get(url=url)
        
    @task
    def live15(self):
        url = "/api/appapi/api/content/list/10?perPage=20&client=android&no_content=1&page=1&api_version=4.0&tenantid=a33433adbbe5d17cacaa7fcc97556ebc&tenantId=a33433adbbe5d17cacaa7fcc97556ebc&cms_app_id=19&app_id=2&app_version=1.0.40&sign=2a42e7e15d3d6f43fe699aef71276ffc"
        res = self.client.get(url=url)
        

class WebsiteUser(HttpUser):
    # 声明执行的任务集是哪个类
    tasks = [msiTask]
    host = "https://console.jarmt.cn"
    # 最小等待时间和最大等待时间   请求间的间隔时间
    min_wait = 1000
    max_wait = 2000
